popover: set priv->window before setting doing add_popover() on it
authorCarlos Garnacho <carlosg@gnome.org>
Sat, 21 May 2016 17:43:15 +0000 (19:43 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Sat, 21 May 2016 18:40:43 +0000 (20:40 +0200)
commit76a5e3fc3cefebff397a2dcf94f4699c32087979
tree405a08705cdd91cf3dca778888bcd6510cc3c1f7
parentebf703ff5ac8a69c2c35f003620ea5b7a4e7eb0e
popover: set priv->window before setting doing add_popover() on it

If the popover's relative-to widget is unparented/reparented, we end
up unparenting/reparenting the popover as well. In that case, at the
moment of reparenting, the widget might have been visible (and is
thus mapped again), but priv->window hasn't been set yet.

We must first set priv->window, and then call gtk_window_add_popover(),
that way gtk_popover_map() has its prerequisites straight.

https://bugzilla.gnome.org/show_bug.cgi?id=766323
gtk/gtkpopover.c